
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>2-9 python3小白课：字符串进阶 · python3小白课笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="雪山凌狐">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-material-light.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ad/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-image-captions/image-captions.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../css/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="2-10 python3小白课：赋值运算符.html" />
    
    
    <link rel="prev" href="2-8 python3小白课：字节串.html" />
    

    
        <link rel="shortcut icon" href='../assets/favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../assets/favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://fox-9.com" target="_blank" class="custom-link">雪山凌狐教程</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Python3小白课 介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Catalog.html">
            
                <a href="../Catalog.html">
            
                    
                    课程目录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../chapter1/">
            
                <a href="../chapter1/">
            
                    
                    一、Python初识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter1/1-1 python3小白课：python语言简介.html">
            
                <a href="../chapter1/1-1 python3小白课：python语言简介.html">
            
                    
                    1-1 python3小白课：python语言简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter1/1-2 python3小白课：python下载.html">
            
                <a href="../chapter1/1-2 python3小白课：python下载.html">
            
                    
                    1-2 python3小白课：python下载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../chapter1/1-3 python3小白课：python安装.html">
            
                <a href="../chapter1/1-3 python3小白课：python安装.html">
            
                    
                    1-3 python3小白课：python安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../chapter1/1-4 python3小白课：我的第一个python脚本.html">
            
                <a href="../chapter1/1-4 python3小白课：我的第一个python脚本.html">
            
                    
                    1-4 python3小白课：我的第一个python脚本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../chapter1/1-5 python3小白课：如何运行py文件.html">
            
                <a href="../chapter1/1-5 python3小白课：如何运行py文件.html">
            
                    
                    1-5 python3小白课：如何运行py文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../chapter1/1-6 python3小白课：使用python IDLE.html">
            
                <a href="../chapter1/1-6 python3小白课：使用python IDLE.html">
            
                    
                    1-6 python3小白课：使用python IDLE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../chapter1/1-7 python3小白课：使用python shell.html">
            
                <a href="../chapter1/1-7 python3小白课：使用python shell.html">
            
                    
                    1-7 python3小白课：使用python shell
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    二、变量、简单类型和运算符
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="2-1 python3小白课：啥是变量.html">
            
                <a href="2-1 python3小白课：啥是变量.html">
            
                    
                    2-1 python3小白课：啥是变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="2-2 python3小白课：定义常量.html">
            
                <a href="2-2 python3小白课：定义常量.html">
            
                    
                    2-2 python3小白课：定义常量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="2-3 python3小白课：注释让你事半功倍.html">
            
                <a href="2-3 python3小白课：注释让你事半功倍.html">
            
                    
                    2-3 python3小白课：注释让你事半功倍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="2-4 python3小白课：数值类型之整型.html">
            
                <a href="2-4 python3小白课：数值类型之整型.html">
            
                    
                    2-4 python3小白课：数值类型之整型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="2-5 python3小白课：数值类型之浮点型.html">
            
                <a href="2-5 python3小白课：数值类型之浮点型.html">
            
                    
                    2-5 python3小白课：数值类型之浮点型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="2-6 python3小白课：数值类型之复数.html">
            
                <a href="2-6 python3小白课：数值类型之复数.html">
            
                    
                    2-6 python3小白课：数值类型之复数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="2-7 python3小白课：字符串入门.html">
            
                <a href="2-7 python3小白课：字符串入门.html">
            
                    
                    2-7 python3小白课：字符串入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="2-8 python3小白课：字节串.html">
            
                <a href="2-8 python3小白课：字节串.html">
            
                    
                    2-8 python3小白课：字节串
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.9" data-path="2-9 python3小白课：字符串进阶.html">
            
                <a href="2-9 python3小白课：字符串进阶.html">
            
                    
                    2-9 python3小白课：字符串进阶
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="2-10 python3小白课：赋值运算符.html">
            
                <a href="2-10 python3小白课：赋值运算符.html">
            
                    
                    2-10 python3小白课：赋值运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11" data-path="2-11 python3小白课：算术运算符.html">
            
                <a href="2-11 python3小白课：算术运算符.html">
            
                    
                    2-11 python3小白课：算术运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.12" data-path="2-12 python3小白课：索引运算符.html">
            
                <a href="2-12 python3小白课：索引运算符.html">
            
                    
                    2-12 python3小白课：索引运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.13" data-path="2-13 python3小白课：比较运算符.html">
            
                <a href="2-13 python3小白课：比较运算符.html">
            
                    
                    2-13 python3小白课：比较运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.14" data-path="2-14 python3小白课：身份运算符.html">
            
                <a href="2-14 python3小白课：身份运算符.html">
            
                    
                    2-14 python3小白课：身份运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.15" data-path="2-15 python3小白课：逻辑运算符.html">
            
                <a href="2-15 python3小白课：逻辑运算符.html">
            
                    
                    2-15 python3小白课：逻辑运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.16" data-path="2-16 python3小白课：位运算符.html">
            
                <a href="2-16 python3小白课：位运算符.html">
            
                    
                    2-16 python3小白课：位运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.17" data-path="2-17 python3小白课：赋值运算符扩展.html">
            
                <a href="2-17 python3小白课：赋值运算符扩展.html">
            
                    
                    2-17 python3小白课：赋值运算符扩展
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.18" data-path="2-18 python3小白课：三目运算符.html">
            
                <a href="2-18 python3小白课：三目运算符.html">
            
                    
                    2-18 python3小白课：三目运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.19" data-path="2-19 python3小白课：成员运算符.html">
            
                <a href="2-19 python3小白课：成员运算符.html">
            
                    
                    2-19 python3小白课：成员运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.20" data-path="2-20 python3小白课：运算符优先级.html">
            
                <a href="2-20 python3小白课：运算符优先级.html">
            
                    
                    2-20 python3小白课：运算符优先级
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../chapter3/">
            
                <a href="../chapter3/">
            
                    
                    三、列表、元组和字典
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../chapter3/3-1 python3小白课：列表和元组的区别.html">
            
                <a href="../chapter3/3-1 python3小白课：列表和元组的区别.html">
            
                    
                    3-1 python3小白课：列表和元组的区别
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../chapter3/3-2 python3小白课：列表元组入门.html">
            
                <a href="../chapter3/3-2 python3小白课：列表元组入门.html">
            
                    
                    3-2 python3小白课：列表元组入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../chapter3/3-3 python3小白课：深入列表.html">
            
                <a href="../chapter3/3-3 python3小白课：深入列表.html">
            
                    
                    3-3 python3小白课：深入列表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../chapter3/3-4 python3小白课：字典初识.html">
            
                <a href="../chapter3/3-4 python3小白课：字典初识.html">
            
                    
                    3-4 python3小白课：字典初识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../chapter3/3-5 python3小白课：字典操作基础.html">
            
                <a href="../chapter3/3-5 python3小白课：字典操作基础.html">
            
                    
                    3-5 python3小白课：字典操作基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../chapter3/3-6 python3小白课：字典的常用方法.html">
            
                <a href="../chapter3/3-6 python3小白课：字典的常用方法.html">
            
                    
                    3-6 python3小白课：字典的常用方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../chapter4/">
            
                <a href="../chapter4/">
            
                    
                    四、流程控制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../chapter4/4-1 python3小白课：if分支结构.html">
            
                <a href="../chapter4/4-1 python3小白课：if分支结构.html">
            
                    
                    4-1 python3小白课：if分支结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../chapter4/4-2 python3小白课：while循环结构.html">
            
                <a href="../chapter4/4-2 python3小白课：while循环结构.html">
            
                    
                    4-2 python3小白课：while循环结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../chapter4/4-3 python3小白课：for-in循环结构.html">
            
                <a href="../chapter4/4-3 python3小白课：for-in循环结构.html">
            
                    
                    4-3 python3小白课：for-in循环结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../chapter4/4-4 python3小白课：for表达式.html">
            
                <a href="../chapter4/4-4 python3小白课：for表达式.html">
            
                    
                    4-4 python3小白课：for表达式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../chapter5/">
            
                <a href="../chapter5/">
            
                    
                    五、自定义函数
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../chapter5/5-1 python3小白课：函数是什么.html">
            
                <a href="../chapter5/5-1 python3小白课：函数是什么.html">
            
                    
                    5-1 python3小白课：函数是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../chapter5/5-2 python3小白课：函数入门.html">
            
                <a href="../chapter5/5-2 python3小白课：函数入门.html">
            
                    
                    5-2 python3小白课：函数入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../chapter5/5-3 python3小白课：递归函数.html">
            
                <a href="../chapter5/5-3 python3小白课：递归函数.html">
            
                    
                    5-3 python3小白课：递归函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../chapter5/5-4 python3小白课：关键字参数.html">
            
                <a href="../chapter5/5-4 python3小白课：关键字参数.html">
            
                    
                    5-4 python3小白课：关键字参数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../chapter5/5-5 python3小白课：参数默认值.html">
            
                <a href="../chapter5/5-5 python3小白课：参数默认值.html">
            
                    
                    5-5 python3小白课：参数默认值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="../chapter5/5-6 python3小白课：参数收集.html">
            
                <a href="../chapter5/5-6 python3小白课：参数收集.html">
            
                    
                    5-6 python3小白课：参数收集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="../chapter5/5-7 python3小白课：变量作用域.html">
            
                <a href="../chapter5/5-7 python3小白课：变量作用域.html">
            
                    
                    5-7 python3小白课：变量作用域
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.8" data-path="../chapter5/5-8 python3小白课：局部函数.html">
            
                <a href="../chapter5/5-8 python3小白课：局部函数.html">
            
                    
                    5-8 python3小白课：局部函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../chapter6/">
            
                <a href="../chapter6/">
            
                    
                    六、模块和包
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../chapter6/6-1 python3小白课：模块的导入.html">
            
                <a href="../chapter6/6-1 python3小白课：模块的导入.html">
            
                    
                    6-1 python3小白课：模块的导入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../chapter6/6-2 python3小白课：自己写模块.html">
            
                <a href="../chapter6/6-2 python3小白课：自己写模块.html">
            
                    
                    6-2 python3小白课：自己写模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../chapter6/6-3 python3小白课：导入模块详解.html">
            
                <a href="../chapter6/6-3 python3小白课：导入模块详解.html">
            
                    
                    6-3 python3小白课：导入模块详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../chapter6/6-4 python3小白课：包是什么.html">
            
                <a href="../chapter6/6-4 python3小白课：包是什么.html">
            
                    
                    6-4 python3小白课：包是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="../chapter6/6-5 python3小白课：定义包.html">
            
                <a href="../chapter6/6-5 python3小白课：定义包.html">
            
                    
                    6-5 python3小白课：定义包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.6" data-path="../chapter6/6-6 python3小白课：包成员导入.html">
            
                <a href="../chapter6/6-6 python3小白课：包成员导入.html">
            
                    
                    6-6 python3小白课：包成员导入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.7" data-path="../chapter6/6-7 python3小白课：模块内容查看.html">
            
                <a href="../chapter6/6-7 python3小白课：模块内容查看.html">
            
                    
                    6-7 python3小白课：模块内容查看
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.8" data-path="../chapter6/6-8 python3小白课：解锁你心仪的三方包.html">
            
                <a href="../chapter6/6-8 python3小白课：解锁你心仪的三方包.html">
            
                    
                    6-8 python3小白课：解锁你心仪的三方包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.9" data-path="../chapter6/6-9 python3小白课：虚拟环境介绍和安装.html">
            
                <a href="../chapter6/6-9 python3小白课：虚拟环境介绍和安装.html">
            
                    
                    6-9 python3小白课：虚拟环境介绍和安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.10" data-path="../chapter6/6-10 python3小白课：虚拟环境使用.html">
            
                <a href="../chapter6/6-10 python3小白课：虚拟环境使用.html">
            
                    
                    6-10 python3小白课：虚拟环境使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../chapter7/">
            
                <a href="../chapter7/">
            
                    
                    七、类和对象
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../chapter7/7-1 python3小白课：一节课搞懂面向对象.html">
            
                <a href="../chapter7/7-1 python3小白课：一节课搞懂面向对象.html">
            
                    
                    7-1 python3小白课：一节课搞懂面向对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../chapter7/7-2 python3小白课：定义类和实例化对象.html">
            
                <a href="../chapter7/7-2 python3小白课：定义类和实例化对象.html">
            
                    
                    7-2 python3小白课：定义类和实例化对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../chapter7/7-3 python3小白课：了解实例方法.html">
            
                <a href="../chapter7/7-3 python3小白课：了解实例方法.html">
            
                    
                    7-3 python3小白课：了解实例方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="../chapter7/7-4 python3小白课：用property函数定义属性.html">
            
                <a href="../chapter7/7-4 python3小白课：用property函数定义属性.html">
            
                    
                    7-4 python3小白课：用property函数定义属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" data-path="../chapter7/7-5 python3小白课：封装和隐藏.html">
            
                <a href="../chapter7/7-5 python3小白课：封装和隐藏.html">
            
                    
                    7-5 python3小白课：封装和隐藏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.6" data-path="../chapter7/7-6 python3小白课：类的继承和多继承.html">
            
                <a href="../chapter7/7-6 python3小白课：类的继承和多继承.html">
            
                    
                    7-6 python3小白课：类的继承和多继承
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.7" data-path="../chapter7/7-7 python3小白课：重写父类方法和使用super函数.html">
            
                <a href="../chapter7/7-7 python3小白课：重写父类方法和使用super函数.html">
            
                    
                    7-7 python3小白课：重写父类方法和使用super函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.8" data-path="../chapter7/7-8 python3小白课：类的多态性.html">
            
                <a href="../chapter7/7-8 python3小白课：类的多态性.html">
            
                    
                    7-8 python3小白课：类的多态性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.9" data-path="../chapter7/7-9 python3小白课：可以被枚举的类.html">
            
                <a href="../chapter7/7-9 python3小白课：可以被枚举的类.html">
            
                    
                    7-9 python3小白课：可以被枚举的类
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../chapter8/">
            
                <a href="../chapter8/">
            
                    
                    八、异常处理机制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../chapter8/8-1 python3小白课：最基本的异常处理.html">
            
                <a href="../chapter8/8-1 python3小白课：最基本的异常处理.html">
            
                    
                    8-1 python3小白课：最基本的异常处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../chapter8/8-2 python3小白课：多异常捕获.html">
            
                <a href="../chapter8/8-2 python3小白课：多异常捕获.html">
            
                    
                    8-2 python3小白课：多异常捕获
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../chapter8/8-3 python3小白课：查看详细异常信息.html">
            
                <a href="../chapter8/8-3 python3小白课：查看详细异常信息.html">
            
                    
                    8-3 python3小白课：查看详细异常信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../chapter8/8-4 python3小白课：异常机制中的else块.html">
            
                <a href="../chapter8/8-4 python3小白课：异常机制中的else块.html">
            
                    
                    8-4 python3小白课：异常机制中的else块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../chapter8/8-5 python3小白课：finally块回收资源.html">
            
                <a href="../chapter8/8-5 python3小白课：finally块回收资源.html">
            
                    
                    8-5 python3小白课：finally块回收资源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" data-path="../chapter8/8-6 python3小白课：自己引发异常.html">
            
                <a href="../chapter8/8-6 python3小白课：自己引发异常.html">
            
                    
                    8-6 python3小白课：自己引发异常
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../Summary.html">
            
                <a href="../Summary.html">
            
                    
                    课程总结
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >2-9 python3小白课：字符串进阶</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <html><head></head><body><div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#python3&#x5C0F;&#x767D;&#x8BFE;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x8FDB;&#x9636;"><b></b>python3&#x5C0F;&#x767D;&#x8BFE;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x8FDB;&#x9636;</a></li><ul><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x8F6C;&#x4E49;&#x5B57;&#x7B26;"><b></b>&#x8F6C;&#x4E49;&#x5B57;&#x7B26;</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;"><b></b>&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#format&#x51FD;&#x6570;"><b></b>format&#x51FD;&#x6570;</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#f-string"><b></b>f-string</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x5B57;&#x7B26;&#x4E32;&#x7D22;&#x5F15;&#x53CA;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><b></b>&#x5B57;&#x7B26;&#x4E32;&#x7D22;&#x5F15;&#x53CA;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x5B57;&#x7B26;&#x4E32;str&#x7C7B;&#x578B;&#x81EA;&#x5E26;&#x7684;&#x4E00;&#x4E9B;&#x5185;&#x7F6E;&#x65B9;&#x6CD5;"><b></b>&#x5B57;&#x7B26;&#x4E32;str&#x7C7B;&#x578B;&#x81EA;&#x5E26;&#x7684;&#x4E00;&#x4E9B;&#x5185;&#x7F6E;&#x65B9;&#x6CD5;</a></li><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x5355;&#x8BCD;&#x91CA;&#x4E49;"><b></b>&#x5355;&#x8BCD;&#x91CA;&#x4E49;</a></li></ul></ul></ul></div><h1 id="python3&#x5C0F;&#x767D;&#x8BFE;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x8FDB;&#x9636;"><a name="python3&#x5C0F;&#x767D;&#x8BFE;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x8FDB;&#x9636;" class="anchor-navigation-ex-anchor" href="#python3&#x5C0F;&#x767D;&#x8BFE;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x8FDB;&#x9636;"><i class="fa fa-link" aria-hidden="true"></i></a>python3&#x5C0F;&#x767D;&#x8BFE;&#xFF1A;&#x5B57;&#x7B26;&#x4E32;&#x8FDB;&#x9636;</h1>
<p>&#x4E4B;&#x524D;&#x6211;&#x4EEC;&#x5B66;&#x4E60;&#x4E86;python&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x5165;&#x95E8;&#x77E5;&#x8BC6;&#xFF0C;&#x5B83;&#x4EEC;&#x5185;&#x5BB9;&#x4E0D;&#x5C11;&#xFF0C;&#x4E0D;&#x77E5;&#x9053;&#x5927;&#x5BB6;&#x6D88;&#x5316;&#x5F97;&#x600E;&#x4E48;&#x6837;&#x4E86;&#x5462;&#xFF1F;</p>
<p>&#x8FD9;&#x8282;&#x8BFE;&#x6211;&#x4EEC;&#x6765;&#x5B66;&#x4E60;&#x4E00;&#x4E9B;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x8FDB;&#x9636;&#x77E5;&#x8BC6;&#xFF0C;&#x638C;&#x63E1;&#x597D;&#x672C;&#x8282;&#x8BFE;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x5BF9;&#x4F60;&#x9AD8;&#x6548;&#x7684;&#x4F7F;&#x7528;&#x5B57;&#x7B26;&#x4E32;&#x5E2E;&#x52A9;&#x9887;&#x5927;&#xFF0C;&#x6211;&#x4EEC;&#x4F9D;&#x7136;&#x63D0;&#x53D6;&#x6700;&#x7CBE;&#x7EC3;&#x7684;&#x5185;&#x5BB9;&#x4F20;&#x6388;&#x7ED9;&#x5927;&#x5BB6;&#x3002;</p>
<hr>
<h3 id="&#x8F6C;&#x4E49;&#x5B57;&#x7B26;"><a name="&#x8F6C;&#x4E49;&#x5B57;&#x7B26;" class="anchor-navigation-ex-anchor" href="#&#x8F6C;&#x4E49;&#x5B57;&#x7B26;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8F6C;&#x4E49;&#x5B57;&#x7B26;</h3>
<p>&#x4E4B;&#x524D;&#x6211;&#x4EEC;&#x8BB2;&#x89E3;&#x8FC7;<code>\</code>&#x7B26;&#x53F7;&#x53EF;&#x4EE5;&#x4F5C;&#x4E3A;&#x8F6C;&#x4E49;&#x5B57;&#x7B26;&#x3002;&#x9664;&#x4E86;&#x4E4B;&#x524D;&#x6559;&#x5B66;&#x7684;&#x573A;&#x666F;&#x4E4B;&#x5916;&#xFF0C;python&#x8FD8;&#x80FD;&#x652F;&#x6301;&#x4E00;&#x4E9B;&#x5176;&#x4ED6;&#x7684;&#x8F6C;&#x4E49;&#x7B26;&#xFF0C;&#x6211;&#x4EEC;&#x6765;&#x5217;&#x4E3E;&#x5E38;&#x7528;&#x7684;&#x4E00;&#x4E9B;&#xFF1A;</p>
<pre class="language-"><code class="lang-python"><span class="token comment"># coding:utf-8</span>
<span class="token comment"># \n&#x8868;&#x793A;&#x6362;&#x884C;&#x7B26;&#xFF0C;&#x6BD4;&#x8F83;&#x5E38;&#x7528;&#x5230;</span>
a <span class="token operator">=</span> <span class="token string">&quot;&#x6211;&#x662F;&#x7B2C;&#x4E00;&#x884C;\n&#x6211;&#x662F;&#x7B2C;&#x4E8C;&#x884C;&quot;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span>
<span class="token comment"># &#x5F53;&#x6211;&#x4EEC;&#x8981;&#x5FAA;&#x73AF;&#x6253;&#x51FA;&#x4E00;&#x6BB5;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x5199;&#x591A;&#x904D;&#xFF0C;&#x7528;*&#x53F7;&#xFF0C;&#x540E;&#x9762;&#x52A0;&#x4E0A;&#x91CD;&#x590D;&#x7684;&#x6B21;&#x6570;&#x5373;&#x53EF;&#xFF0C;&#x6BD4;&#x5982;&#x8FD9;&#x91CC;&#x6253;&#x5370;40&#x4E2A;*&#x53F7;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&quot;*&quot;</span> <span class="token operator">*</span> <span class="token number">40</span><span class="token punctuation">)</span>
<span class="token comment"># \t&#x8868;&#x793A;&#x5236;&#x8868;&#x7B26;&#xFF0C;&#x7C7B;&#x4F3C;&#x4F60;&#x952E;&#x76D8;&#x4E0A;&#x7684;Tab&#x952E;&#x7684;&#x8DDD;&#x79BB;</span>
b <span class="token operator">=</span> <span class="token string">&quot;&#x6211;&#x662F;&#x7B2C;&#x4E00;&#x884C;\t&#x6211;&#x662F;&#x7B2C;&#x4E8C;&#x884C;&quot;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>b<span class="token punctuation">)</span>
</code></pre>
<p>&#x4E0A;&#x9762;&#x7684;&#x4F8B;&#x5B50;&#x5305;&#x542B;&#x7684;&#x77E5;&#x8BC6;&#x70B9;&#x633A;&#x591A;&#x54E6;&#xFF0C;&#x597D;&#x597D;&#x5B66;&#x4E60;&#x4E0B;&#x3002;</p>
<p>&#x5176;&#x4ED6;&#x8FD8;&#x6709;&#x4E00;&#x4E9B;&#x81EA;&#x5E26;&#x652F;&#x6301;&#x7684;&#x8F6C;&#x4E49;&#x7B26;&#x6211;&#x4EEC;&#x5C31;&#x4E0D;&#x4E00;&#x4E00;&#x5217;&#x4E3E;&#x4E86;&#xFF0C;&#x611F;&#x5174;&#x8DA3;&#x7684;&#x540C;&#x5B66;&#x53EF;&#x4EE5;&#x81EA;&#x884C;&#x627E;&#x4E0B;&#x8D44;&#x6599;&#x3002;</p>
<hr>
<h3 id="&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;"><a name="&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;" class="anchor-navigation-ex-anchor" href="#&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;</h3>
<p>&#x8FD8;&#x8BB0;&#x5F97;&#x6211;&#x4EEC;&#x5165;&#x95E8;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x4F7F;&#x7528;&#x7684;&#x662F;<code>+</code>&#x53F7;&#x7684;&#x65B9;&#x6CD5;&#x628A;&#x5B57;&#x7B26;&#x4E32;&#x8054;&#x7ED3;&#x8D77;&#x6765;&#xFF0C;&#x5F53;&#x9047;&#x5230;&#x4E0D;&#x540C;&#x7C7B;&#x578B;&#x7684;&#x6570;&#x636E;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x628A;&#x6570;&#x636E;&#x5148;&#x8F6C;&#x6362;&#x6210;&#x5B57;&#x7B26;&#x4E32;&#x578B;&#x3002;&#x8FD9;&#x6837;&#x6709;&#x51E0;&#x70B9;&#x4E0D;&#x4FBF;&#xFF0C;&#x5176;&#x4E2D;&#x7684;&#x4E00;&#x70B9;&#x662F;&#xFF0C;&#x5F53;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x7684;&#x53D8;&#x91CF;&#x592A;&#x591A;&#xFF0C;&#x9700;&#x8981;&#x5199;&#x591A;&#x4E2A;+&#x53F7;&#x6765;&#x8054;&#x7ED3;&#xFF0C;&#x53E6;&#x4E00;&#x70B9;&#x662F;&#x8981;&#x7ECF;&#x5E38;&#x5173;&#x6CE8;&#x6570;&#x636E;&#x7C7B;&#x578B;&#xFF0C;&#x5BB9;&#x6613;&#x62A5;&#x9519;&#x7B49;&#x3002;</p>
<p>&#x8FD9;&#x65F6;&#x5019;&#xFF0C;&#x6211;&#x4EEC;&#x66F4;&#x5E38;&#x7528;&#x66F4;&#x5E38;&#x89C1;&#x7684;&#x795E;&#x5668;&#xFF0C;&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x6765;&#x4E86;&#xFF01;</p>
<p>&#x5148;&#x6765;&#x770B;&#x4E0B;&#x4F8B;&#x5B50;&#x611F;&#x53D7;&#x4E00;&#x4E0B;&#xFF0C;&#x6211;&#x7528;&#x4E86;&#x65E5;&#x5E38;&#x7F16;&#x7A0B;&#x4E2D;&#x66F4;&#x4E3A;&#x5E38;&#x89C1;&#x7684;&#x8F6C;&#x6362;&#x8BF4;&#x660E;&#x7B26;&#x6765;&#x5199;&#xFF1A;</p>
<pre class="language-"><code class="lang-python"><span class="token comment"># coding:utf-8</span>
a <span class="token operator">=</span> <span class="token string">&quot;&#x6211;&#x7684;&#x540D;&#x5B57;&#x662F;%s&#xFF0C;&#x6211;&#x7684;&#x5E74;&#x9F84;&#x662F;%d&#x3002;\n&#x6211;&#x77E5;&#x9053;&#xFF0C;&#x3C0;&#x7684;&#x503C;&#x4E3A;%.2f&quot;</span> <span class="token operator">%</span> <span class="token punctuation">(</span><span class="token string">&quot;&#x5C0F;&#x767D;&quot;</span><span class="token punctuation">,</span> <span class="token number">18</span><span class="token punctuation">,</span> <span class="token number">3.1415926</span><span class="token punctuation">)</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span>
b <span class="token operator">=</span> <span class="token string">&quot;&#x73B0;&#x5728;&#x4F60;&#x5728;&#x3010;%s&#x3011;&#x5B66;&#x4E60;python&#x5C0F;&#x767D;&#x8BFE;&#x5462;~&quot;</span> <span class="token operator">%</span> <span class="token string">&quot;&#x96EA;&#x5C71;&#x51CC;&#x72D0;&#x6559;&#x7A0B;&quot;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>b<span class="token punctuation">)</span>
</code></pre>
<p>&#x6765;&#x6211;&#x4EEC;&#x6765;&#x770B;&#x4E00;&#x4E0B;&#xFF0C;&#x8FD9;&#x4E24;&#x53E5;&#x793A;&#x4F8B;&#x4EE3;&#x7801;&#x90FD;&#x5148;&#x7528;&#x5B57;&#x7B26;&#x4E32;&#x5B9A;&#x4E49;&#x4E86;&#x4E00;&#x4E32;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x7A7A;&#x683C;&#x4E4B;&#x540E;&#x8DDF;&#x4E86;&#x4E00;&#x4E2A;<code>%</code>&#x7B26;&#x53F7;&#xFF0C;&#x518D;&#x7A7A;&#x683C;&#x4E4B;&#x540E;&#xFF0C;&#x5BF9;&#x5E94;&#x7684;&#x5199;&#x5165;&#x4E86;&#x4E00;&#x4E9B;&#x5185;&#x5BB9;&#xFF0C;&#x6709;&#x7684;&#x7528;&#x62EC;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#x4E86;&#xFF0C;&#x6709;&#x7684;&#x6CA1;&#x7528;&#xFF0C;&#x5BF9;&#x5427;&#xFF1F;</p>
<p>&#x90A3;&#x4E48;&#x6211;&#x4EEC;&#x9996;&#x5148;&#x770B;&#x4E00;&#x4E0B;&#x7B2C;&#x4E00;&#x90E8;&#x5206;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5185;&#x5BB9;&#xFF0C;&#x901A;&#x8FC7;&#x5BF9;&#x6BD4;&#x8F93;&#x51FA;&#x7ED3;&#x679C;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#xFF0C;&#x6211;&#x4EEC;&#x5728;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x4E5F;&#x6709;<code>%</code>&#x53F7;&#xFF0C;&#x5E76;&#x4E14;&#x540E;&#x9762;&#x8DDF;&#x4E86;&#x4E00;&#x4E9B;&#x5B57;&#x6BCD;&#x7B49;&#x5185;&#x5BB9;&#x3002;&#x63A5;&#x4E0B;&#x6765;&#x6211;&#x4EEC;&#x5C31;&#x6765;&#x89E3;&#x91CA;&#x4E00;&#x4E0B;&#x6211;&#x4EEC;&#x7528;&#x5230;&#x7684;&#x51E0;&#x4E2A;&#x8F6C;&#x6362;&#x8BF4;&#x660E;&#x7B26;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x8F6C;&#x6362;&#x8BF4;&#x660E;&#x7B26;</th>
<th>&#x8BF4;&#x660E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>%s</td>
<td>&#x5C06;&#x5185;&#x5BB9;&#xFF08;&#x53D8;&#x91CF;&#x6216;&#x8005;&#x8868;&#x8FBE;&#x5F0F;&#xFF09;&#x7528;str&#x547D;&#x4EE4;&#x8F6C;&#x6362;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;</td>
</tr>
<tr>
<td>%d</td>
<td>&#x8F6C;&#x6362;&#x4E3A;&#x5E26;&#x7B26;&#x53F7;&#x7684;&#x5341;&#x8FDB;&#x5236;&#x5F62;&#x5F0F;&#x7684;&#x6574;&#x6570;</td>
</tr>
<tr>
<td>%f</td>
<td>&#x8F6C;&#x6362;&#x4E3A;&#x5341;&#x8FDB;&#x5236;&#x5F62;&#x5F0F;&#x7684;&#x6D6E;&#x70B9;&#x6570;&#xFF0C;.num&#x8868;&#x793A;&#x4FDD;&#x7559;&#x5C0F;&#x6570;&#x70B9;&#x540E;&#x9762;num&#x4F4D;&#xFF0C;&#x5982;&#x679C;&#x7ED9;&#x7684;&#x503C;&#x4E0D;&#x591F;&#x8FD9;&#x4E2A;num&#x5927;&#xFF0C;&#x5219;&#x4F1A;&#x8865;&#x4F4D;</td>
</tr>
</tbody>
</table>
<p>&#x5176;&#x4ED6;&#x4E00;&#x4E9B;&#x8F6C;&#x6362;&#x8BF4;&#x660E;&#x7B26;&#x8FD8;&#x6709;&#xFF0C;&#x4E0D;&#x8FC7;&#x638C;&#x63E1;&#x51E0;&#x4E2A;&#x5E38;&#x89C1;&#x7684;&#x65E5;&#x5E38;&#x4E5F;&#x57FA;&#x672C;&#x591F;&#x7528;&#x4E86;&#xFF0C;&#x8FD9;&#x6837;&#x5927;&#x5BB6;&#x8BB0;&#x5FC6;&#x8D77;&#x6765;&#x5C31;&#x4E0D;&#x8D39;&#x529B;&#x3002;&#x5982;&#x679C;&#x4F60;&#x5BF9;&#x5176;&#x4ED6;&#x7684;&#x8BF4;&#x660E;&#x7B26;&#x611F;&#x5174;&#x8DA3;&#xFF0C;&#x53EF;&#x4EE5;&#x81EA;&#x884C;&#x67E5;&#x9605;&#x8D44;&#x6599;&#x3002;</p>
<p>&#x7136;&#x540E;&#x63A5;&#x4E0B;&#x6765;&#x662F;&#x4E00;&#x4E2A;&#x56FA;&#x5B9A;&#x7684;<code>%</code>&#x7B26;&#x53F7;&#x4F5C;&#x4E3A;&#x5206;&#x9694;&#x7B26;&#x3002;</p>
<p>&#x6700;&#x540E;&#x5C31;&#x662F;&#x6211;&#x4EEC;&#x7684;&#x5185;&#x5BB9;&#x4E86;&#xFF0C;&#x5185;&#x5BB9;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5199;&#x503C;&#x4E5F;&#x53EF;&#x4EE5;&#x652F;&#x6301;&#x53D8;&#x91CF;&#x6216;&#x8005;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x5F62;&#x5F0F;&#x3002;&#x5982;&#x679C;&#x524D;&#x9762;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5B9A;&#x4E49;&#x4E86;&#x591A;&#x4E2A;&#xFF0C;&#x9700;&#x8981;&#x7528;&#x9017;&#x53F7;<code>,</code>&#x9694;&#x5F00;&#xFF0C;&#x5E76;&#x4E14;&#x5916;&#x9762;&#x5957;&#x4E0A;&#x5C0F;&#x62EC;&#x53F7;&#xFF0C;&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;&#xFF0C;&#x524D;&#x9762;&#x5B9A;&#x4E49;&#x4E86;&#x51E0;&#x4E2A;&#xFF0C;&#x540E;&#x9762;&#x5C31;&#x7ED9;&#x51E0;&#x4E2A;&#xFF0C;&#x4E0D;&#x8981;&#x6570;&#x91CF;&#x4E0D;&#x6B63;&#x786E;&#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x62A5;&#x9519;&#x54E6;&#x3002;&#x5982;&#x679C;&#x53EA;&#x5B9A;&#x4E49;&#x4E86;&#x4E00;&#x4E2A;&#xFF0C;&#x90A3;&#x4E48;&#x76F4;&#x63A5;&#x5199;&#x5B83;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#x3002;&#x5C06;&#x4E00;&#x4E9B;&#x5185;&#x5BB9;&#x7528;&#x5C0F;&#x62EC;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#xFF0C;&#x5728;python&#x4E2D;&#x53EB;&#x505A;<code>&#x5143;&#x7EC4;&#xFF08;tuple&#xFF09;</code>&#x3002;&#x6709;&#x5173;&#x5143;&#x7EC4;&#x7684;&#x77E5;&#x8BC6;&#x540E;&#x9762;&#x6211;&#x4EEC;&#x4F1A;&#x53E6;&#x5916;&#x518D;&#x91CD;&#x70B9;&#x8BB2;&#x89E3;&#xFF0C;&#x4F60;&#x7A0D;&#x5FAE;&#x77E5;&#x9053;&#x4E00;&#x4E0B;&#x5373;&#x53EF;&#x3002;</p>
<p>&#x600E;&#x4E48;&#x6837;&#xFF1F;&#x662F;&#x4E0D;&#x662F;&#x5F88;&#x65B9;&#x4FBF;&#xFF1F;+&#x53F7;&#x662F;&#x4E0D;&#x662F;&#x5C11;&#x5199;&#x4E86;&#x5F88;&#x591A;&#xFF1F;</p>
<h3 id="format&#x51FD;&#x6570;"><a name="format&#x51FD;&#x6570;" class="anchor-navigation-ex-anchor" href="#format&#x51FD;&#x6570;"><i class="fa fa-link" aria-hidden="true"></i></a>format&#x51FD;&#x6570;</h3>
<p>&#x8FD9;&#x4E5F;&#x662F;&#x5B9E;&#x6218;&#x4E2D;&#x7528;&#x5F97;&#x6BD4;&#x8F83;&#x591A;&#x7684;&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x65B9;&#x6CD5;&#xFF0C;&#x6211;&#x4EEC;&#x6765;&#x770B;&#x4E2A;&#x7B80;&#x5355;&#x7684;&#x4F8B;&#x5B50;&#x5C31;&#x61C2;&#x4E86;&#xFF1A;</p>
<pre class="language-"><code class="lang-python"><span class="token comment"># coding:utf-8</span>
<span class="token comment"># format&#x51FD;&#x6570;&#x7684;&#x53C2;&#x6570;&#x4E2D;&#xFF0C;&#x53EF;&#x4EE5;&#x5E26;&#x4E0A;&#x53C2;&#x6570;&#x540D;&#xFF0C;&#x53EF;&#x4EE5;&#x4E0D;&#x6309;&#x987A;&#x5E8F;&#xFF0C;&#x5982;&#x679C;&#x4E0D;&#x5E26;&#x53C2;&#x6570;&#x540D;&#xFF0C;&#x5C31;&#x5FC5;&#x987B;&#x6309;&#x987A;&#x5E8F;&#x7ED9;&#x503C;</span>
a <span class="token operator">=</span> <span class="token string">&quot;&#x6211;&#x7684;&#x540D;&#x5B57;&#x662F;{name}&#xFF0C;&#x6211;&#x7684;&#x5E74;&#x9F84;&#x662F;{age}&quot;</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>age<span class="token operator">=</span><span class="token number">18</span><span class="token punctuation">,</span> name<span class="token operator">=</span><span class="token string">&quot;&#x5C0F;&#x767D;&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span>
<span class="token comment"># &#x4E5F;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x5199;&#x548C;&#x5B9A;&#x4E49;</span>
a <span class="token operator">=</span> <span class="token string">&quot;&#x6211;&#x7684;&#x540D;&#x5B57;&#x662F;{}&#xFF0C;&#x6211;&#x7684;&#x5E74;&#x9F84;&#x662F;{}&quot;</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span><span class="token string">&quot;&#x5C0F;&#x767D;&quot;</span><span class="token punctuation">,</span> <span class="token number">98</span><span class="token punctuation">)</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span>
</code></pre>
<p>&#x5F88;&#x7B80;&#x5355;&#xFF0C;&#x4F1A;&#x4E86;&#x5417;&#xFF1F;&#x7528;&#x4E0A;<code>{}</code>&#x5927;&#x62EC;&#x53F7;&#x5373;&#x53EF;&#x3002;</p>
<h3 id="f-string"><a name="f-string" class="anchor-navigation-ex-anchor" href="#f-string"><i class="fa fa-link" aria-hidden="true"></i></a>f-string</h3>
<p>&#x4E0A;&#x8FF0;&#x7684;&#x683C;&#x5F0F;&#x5316;&#x65B9;&#x6CD5;&#x662F;&#x8FC7;&#x53BB;&#x7684;&#x7248;&#x672C;python&#x4E00;&#x76F4;&#x90FD;&#x6709;&#x7684;&#xFF0C;&#x6211;&#x4EEC;&#x8FD9;&#x91CC;&#x8865;&#x5145;&#x8BB2;&#x89E3;&#x4E00;&#x4E0B;&#x636E;&#x8BF4;&#x662F;python3.6&#x7248;&#x672C;&#x4EE5;&#x4E0A;&#x624D;&#x65B0;&#x52A0;&#x7684;&#x4E1C;&#x4E1C;&#x2014;&#x2014;<code>f-string</code>&#xFF0C;&#x8BA9;&#x6211;&#x4EEC;&#x4E5F;&#x6765;&#x6F6E;&#x6D41;&#x4E00;&#x628A;&#x3002;&#x5B83;&#x53EF;&#x80FD;&#x6BD4;format&#x51FD;&#x6570;&#x66F4;&#x52A0;&#x987A;&#x7545;&#x54E6;&#x3002;</p>
<p><code>f-string</code>&#xFF0C;&#x4EA6;&#x79F0;&#x4E3A;&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;&#x5E38;&#x91CF;&#xFF08;formatted string literals&#xFF09;&#xFF0C;&#x662F;Python3.6&#x65B0;&#x5F15;&#x5165;&#x7684;&#x4E00;&#x79CD;&#x5B57;&#x7B26;&#x4E32;&#x683C;&#x5F0F;&#x5316;&#x65B9;&#x6CD5;&#xFF0C;&#x4E3B;&#x8981;&#x76EE;&#x7684;&#x662F;&#x4F7F;&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;&#x7684;&#x64CD;&#x4F5C;&#x66F4;&#x52A0;&#x7B80;&#x4FBF;&#x3002;</p>
<p>&#x6765;&#x6211;&#x4EEC;&#x76F4;&#x63A5;&#x770B;&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre class="language-"><code class="lang-python"><span class="token comment"># coding:utf-8</span>
name <span class="token operator">=</span> <span class="token string">&quot;&#x5C0F;&#x767D;&quot;</span>
age <span class="token operator">=</span> <span class="token number">18</span>
a <span class="token operator">=</span> <span class="token string-interpolation"><span class="token string">f&quot;&#x6211;&#x7684;&#x540D;&#x5B57;&#x662F;</span><span class="token interpolation"><span class="token punctuation">{</span>name<span class="token punctuation">}</span></span><span class="token string">&#xFF0C;&#x6211;&#x7684;&#x5E74;&#x9F84;&#x662F;</span><span class="token interpolation"><span class="token punctuation">{</span>age<span class="token punctuation">}</span></span><span class="token string">&quot;</span></span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span>
</code></pre>
<p>&#x5176;&#x5B9E;&#x5728;&#x8FD9;&#x91CC;&#xFF0C;&#x5927;&#x62EC;&#x53F7;&#x7684;&#x4F5C;&#x7528;&#x662F;&#x4E00;&#x4E2A;python&#x8868;&#x8FBE;&#x5F0F;&#xFF0C;&#x4F60;&#x8FD8;&#x53EF;&#x4EE5;&#x5728;&#x5927;&#x62EC;&#x53F7;&#x91CC;&#x9762;&#x5199;&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x3002;&#x57FA;&#x7840;&#x4F7F;&#x7528;&#x6211;&#x4EEC;&#x5C31;&#x8BB2;&#x5230;&#x8FD9;&#x91CC;&#x5427;&#xFF0C;&#x5B83;&#x7684;&#x5F3A;&#x5927;&#x4E4B;&#x5904;&#x8FDC;&#x8FDC;&#x4E0D;&#x6B62;&#x8FD9;&#x4E9B;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x60F3;&#x6DF1;&#x5165;&#x4E86;&#x89E3;&#xFF0C;&#x767E;&#x5EA6;&#x4E00;&#x4E0B;<code>f-string</code>&#x5373;&#x53EF;&#x5F97;&#x5230;&#x5F88;&#x591A;&#x4F60;&#x60F3;&#x8981;&#x7684;&#x7B54;&#x6848;&#x4E86;&#x3002;</p>
<hr>
<h3 id="&#x5B57;&#x7B26;&#x4E32;&#x7D22;&#x5F15;&#x53CA;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><a name="&#x5B57;&#x7B26;&#x4E32;&#x7D22;&#x5F15;&#x53CA;&#x76F8;&#x5173;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x5B57;&#x7B26;&#x4E32;&#x7D22;&#x5F15;&#x53CA;&#x76F8;&#x5173;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5B57;&#x7B26;&#x4E32;&#x7D22;&#x5F15;&#x53CA;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</h3>
<p>&#x5F88;&#x591A;&#x65F6;&#x5019;&#xFF0C;&#x6211;&#x4EEC;&#x4EC5;&#x9700;&#x8981;&#x53D6;&#x51FA;&#x4E00;&#x4E32;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x7684;&#x67D0;&#x4E9B;&#x4E2A;&#x5185;&#x5BB9;&#xFF0C;&#x90A3;&#x4E48;&#x5982;&#x4F55;&#x53D6;&#x51FA;&#x5462;&#xFF1F;&#x8FD9;&#x91CC;&#x6211;&#x4EEC;&#x6765;&#x4ECB;&#x7ECD;&#x4E00;&#x4E0B;&#x7D22;&#x5F15;&#x7684;&#x6982;&#x5FF5;&#x3002;</p>
<p>&#x6BD4;&#x5982;&#x6211;&#x4EEC;&#x5B9A;&#x4E49;&#x4E00;&#x4E2A;&#x6700;&#x7B80;&#x5355;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#xFF1A;<code>a = &quot;hello&quot;</code>&#x3002;</p>
<p>&#x5982;&#x679C;&#x4F60;&#x7B97;&#x672F;&#x591F;&#x597D;&#xFF0C;&#x80AF;&#x5B9A;&#x80FD;&#x63B0;&#x51FA;&#x4E94;&#x4E2A;&#x624B;&#x6307;&#x5934;&#x544A;&#x8BC9;&#x6211;&#x8FD9;&#x91CC;&#x6709;<strong>5</strong>&#x4E2A;&#x5B57;&#x6BCD;&#x3002;&#x90A3;&#x4E48;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x7ED9;&#x4ED6;&#x4EEC;&#x6BCF;&#x4E2A;&#x5B57;&#x6BCD;&#x7F16;&#x5236;&#x4E00;&#x4E2A;&#x7D22;&#x5F15;&#x3002;</p>
<blockquote>
<p>[!danger]</p>
<p>&#x5728;python&#x4E2D;&#xFF0C;&#x7D22;&#x5F15;&#x4ECE;<strong>0</strong>&#x5F00;&#x59CB;&#xFF0C;&#x52A1;&#x5FC5;&#x8BB0;&#x4F4F;&#xFF01;&#x662F;0&#xFF01;&#x4E0D;&#x662F;1&#xFF01;&#x5F88;&#x591A;&#x7F16;&#x7A0B;&#x8BED;&#x8A00;&#x7684;&#x7D22;&#x5F15;&#x90FD;&#x4ECE;0&#x5F00;&#x59CB;&#xFF08;&#x4E2A;&#x522B;&#x4ECE;1&#x5F00;&#x59CB;&#x7D22;&#x5F15;&#xFF09;&#xFF0C;&#x8FD9;&#x5BF9;&#x4E8E;&#x6211;&#x4EEC;&#x65E5;&#x5E38;&#x8BF4;&#x4E00;&#x697C;&#x5C31;&#x662F;&#x4E00;&#x697C;&#x7684;&#x4EBA;&#x6709;&#x70B9;&#x96BE;&#x62BD;&#x8C61;&#x51FA;&#x6765;&#xFF0C;&#x4F46;&#x5B9A;&#x4E49;&#x5982;&#x6B64;&#xFF0C;&#x8BF7;&#x4F60;&#x6B7B;&#x8BB0;&#x786C;&#x80CC;&#x597D;~</p>
</blockquote>
<p>&#x6240;&#x4EE5;&#xFF0C;&#x6211;&#x4EEC;&#x7684;&#x4E94;&#x4E2A;&#x5B57;&#x6BCD;&#x7684;&#x7D22;&#x5F15;&#x5206;&#x522B;&#x4E3A;&#xFF1A;<code>0, 1, 2, 3, 4</code>&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x7528;<code>[]</code>&#x4E2D;&#x62EC;&#x53F7;&#x8868;&#x793A;&#x7D22;&#x5F15;&#xFF0C;&#x5982;&#x679C;&#x9700;&#x8981;&#x53D6;&#x51FA;&#x5B57;&#x6BCD;e&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x8868;&#x793A;&#xFF1A;<code>print(a[1])</code></p>
<p>&#x6211;&#x4EEC;&#x8FD8;&#x53EF;&#x4EE5;&#x6709;&#x5176;&#x4ED6;&#x5199;&#x6CD5;&#xFF0C;&#x770B;&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre class="language-"><code class="lang-python"><span class="token comment"># coding:utf-8</span>
a <span class="token operator">=</span> <span class="token string">&quot;hello&quot;</span>
<span class="token comment"># &#x6211;&#x4EEC;&#x6709;&#x5982;&#x4E0B;&#x7D22;&#x5F15;&#x5BF9;&#x5E94;&#x5173;&#x7CFB;&#xFF1A;</span>
<span class="token comment"># [h -&gt; 0], [e -&gt; 1], [l -&gt; 2], [l -&gt; 3], [o -&gt; 4]</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token comment"># &#x53D6;&#x51FA;&#x4ECE;&#x53F3;&#x8FB9;&#x5F00;&#x59CB;&#x7B2C;1&#x4E2A;&#x5B57;&#x7B26;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span><span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token comment"># &#x53D6;&#x51FA;&#x7D22;&#x5F15;&#x4ECE;2&#x5230;4&#xFF08;&#x4E0D;&#x542B;4&#xFF09;&#x7684;&#x5B57;&#x7B26;&#xFF08;&#x5373;&#x7D22;&#x5F15;2~3&#x7684;&#x5B57;&#x7B26;&#xFF09;&#xFF0C;&#x6CE8;&#x610F;&#x5199;&#x5192;&#x53F7;&#x7684;&#x8BDD;&#x6C38;&#x8FDC;&#x662F;&#x5305;&#x542B;&#x5934;&#x7D22;&#x5F15;&#x4E0D;&#x5305;&#x542B;&#x5C3E;&#x7D22;&#x5F15;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">:</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token comment"># &#x53D6;&#x51FA;&#x5012;&#x6570;&#x7B2C;3&#x5230;&#x5012;&#x6570;&#x7B2C;1&#xFF08;&#x4E0D;&#x5305;&#x542B;&#x5012;&#x6570;&#x7B2C;1&#xFF09;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#xFF08;&#x4E0D;&#x80FD;&#x53CD;&#x8FC7;&#x6765;&#x5199;&#x54E6;&#xFF09;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span><span class="token operator">-</span><span class="token number">3</span><span class="token punctuation">:</span><span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token comment"># &#x53D6;&#x51FA;&#x7D22;&#x5F15;&#x4E3A;2&#x4E4B;&#x540E;&#x7684;&#x6240;&#x6709;&#x5B57;&#x7B26;&#x4E32;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">:</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token comment"># &#x53D6;&#x51FA;&#x7D22;&#x5F15;&#x4E3A;1&#xFF08;&#x4E0D;&#x5305;&#x542B;1&#xFF09;&#x4E4B;&#x524D;&#x7684;&#x6240;&#x6709;&#x5B57;&#x7B26;&#x4E32;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">[</span><span class="token punctuation">:</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
<span class="token comment"># &#x7528;in&#x8FD0;&#x7B97;&#x7B26;&#x5224;&#x65AD;&#x67D0;&#x5B57;&#x7B26;&#x4E32;&#x5728;&#x4E0D;&#x5728;&#x539F;&#x5B57;&#x7B26;&#x4E32;&#x91CC;&#x9762;&#xFF0C;&#x5728;&#x8FD4;&#x56DE;True&#x771F;&#xFF0C;&#x4E0D;&#x5728;&#x8FD4;&#x56DE;False&#x5047;&#xFF0C;&#x8FD9;&#x4E2A;&#x5E03;&#x5C14;&#x578B;&#x6211;&#x4EEC;&#x4E4B;&#x524D;&#x8BB2;&#x8FC7;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&quot;lo&quot;</span> <span class="token keyword">in</span> a<span class="token punctuation">)</span>
<span class="token comment"># &#x83B7;&#x53D6;&#x5B57;&#x7B26;&#x7684;&#x603B;&#x957F;&#x5EA6;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;len&#x51FD;&#x6570;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span><span class="token builtin">len</span><span class="token punctuation">(</span>a<span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># &#x7ECF;&#x8FC7;&#x6D4B;&#x8BD5;&#xFF0C;&#x5BF9;&#x4E8E;&#x4E2D;&#x6587;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x5B83;&#x7684;&#x6570;&#x6570;&#x4E5F;&#x662F;&#x6309;&#x7167;&#x82F1;&#x6587;&#x5B57;&#x7B26;&#x4E32;&#x90A3;&#x6837;&#x6765;&#x6570;&#x7684;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x81EA;&#x884C;&#x6DF1;&#x5165;&#x6D4B;&#x8BD5;</span>
b <span class="token operator">=</span> <span class="token string">&quot;&#x6211;&#x662F;&#x5C0F;&#x767D;little bai&quot;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>b<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
</code></pre>
<hr>
<h3 id="&#x5B57;&#x7B26;&#x4E32;str&#x7C7B;&#x578B;&#x81EA;&#x5E26;&#x7684;&#x4E00;&#x4E9B;&#x5185;&#x7F6E;&#x65B9;&#x6CD5;"><a name="&#x5B57;&#x7B26;&#x4E32;str&#x7C7B;&#x578B;&#x81EA;&#x5E26;&#x7684;&#x4E00;&#x4E9B;&#x5185;&#x7F6E;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x5B57;&#x7B26;&#x4E32;str&#x7C7B;&#x578B;&#x81EA;&#x5E26;&#x7684;&#x4E00;&#x4E9B;&#x5185;&#x7F6E;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5B57;&#x7B26;&#x4E32;str&#x7C7B;&#x578B;&#x81EA;&#x5E26;&#x7684;&#x4E00;&#x4E9B;&#x5185;&#x7F6E;&#x65B9;&#x6CD5;</h3>
<p>&#x5B57;&#x7B26;&#x4E32;&#x8FD8;&#x6709;&#x4E00;&#x4E9B;&#x5B83;&#x5185;&#x7F6E;&#x7684;&#x65B9;&#x6CD5;&#xFF0C;&#x8BA9;&#x6211;&#x4EEC;&#x5904;&#x7406;&#x8D77;&#x5B57;&#x7B26;&#x4E32;&#x6765;&#x53EF;&#x4EE5;&#x5F97;&#x5FC3;&#x5E94;&#x624B;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>dir(str)</code>&#x547D;&#x4EE4;&#x67E5;&#x770B;&#x5185;&#x7F6E;&#x7684;&#x65B9;&#x6CD5;&#x6709;&#x54EA;&#x4E9B;&#xFF0C;dir&#x547D;&#x4EE4;&#x4E5F;&#x80FD;&#x67E5;&#x770B;&#x5176;&#x5B83;&#x7C7B;&#x7684;&#x5185;&#x7F6E;&#x65B9;&#x6CD5;&#xFF0C;&#x8FD9;&#x4E2A;&#x5927;&#x5BB6;&#x53EF;&#x4EE5;&#x81EA;&#x5DF1;&#x63A2;&#x7D22;&#x4E0B;&#x3002;&#x8FD0;&#x884C;&#x540E;&#xFF0C;&#x4F1A;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x547D;&#x4EE4;&#x5217;&#x8868;&#xFF08;list&#xFF09;&#xFF0C;&#x5173;&#x4E8E;&#x5217;&#x8868;&#x7684;&#x77E5;&#x8BC6;&#x6211;&#x4EEC;&#x5728;&#x540E;&#x9762;&#x7684;&#x8BFE;&#x7A0B;&#x4E2D;&#x4F1A;&#x8BE6;&#x7EC6;&#x7684;&#x8BB2;&#x89E3;&#xFF0C;&#x5927;&#x5BB6;&#x7A0D;&#x5FAE;&#x77E5;&#x9053;&#x4E00;&#x4E0B;&#x4E2D;&#x62EC;&#x53F7;&#x62EC;&#x8D77;&#x6765;&#x7684;&#x662F;&#x4E00;&#x4E2A;&#x5217;&#x8868;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#x3002;</p>
<p>&#x6211;&#x8FD9;&#x91CC;&#x8FD0;&#x884C;&#x7ED3;&#x679C;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre class="language-"><code class="lang-python"><span class="token punctuation">[</span><span class="token string">&apos;__add__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__class__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__contains__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__delattr__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__dir__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__doc__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__eq__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__format__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__ge__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__getattribute__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__getitem__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__getnewargs__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__gt__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__hash__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__init__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__init_subclass__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__iter__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__le__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__len__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__lt__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__mod__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__mul__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__ne__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__new__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__reduce__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__reduce_ex__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__repr__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__rmod__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__rmul__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__setattr__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__sizeof__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__str__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;__subclasshook__&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;capitalize&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;casefold&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;center&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;count&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;encode&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;endswith&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;expandtabs&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;find&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;format&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;format_map&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;index&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isalnum&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isalpha&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isascii&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isdecimal&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isdigit&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isidentifier&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;islower&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isnumeric&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isprintable&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isspace&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;istitle&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;isupper&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;join&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;ljust&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;lower&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;lstrip&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;maketrans&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;partition&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;replace&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;rfind&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;rindex&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;rjust&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;rpartition&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;rsplit&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;rstrip&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;split&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;splitlines&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;startswith&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;strip&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;swapcase&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;title&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;translate&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;upper&apos;</span><span class="token punctuation">,</span> <span class="token string">&apos;zfill&apos;</span><span class="token punctuation">]</span>
</code></pre>
<blockquote>
<p>[!note]</p>
<p>&#x65B9;&#x6CD5;&#x6709;&#x5F88;&#x591A;&#xFF0C;&#x5176;&#x4E2D;&#x6211;&#x4EEC;&#x6CE8;&#x610F;&#x5230;&#x6709;&#x5F88;&#x591A;&#x65B9;&#x6CD5;&#x5F00;&#x5934;&#x7ED3;&#x5C3E;&#x90FD;&#x6709;<code>__</code>&#x53CC;&#x4E0B;&#x5212;&#x7EBF;&#x7B26;&#x53F7;&#xFF0C;&#x8FD9;&#x4E9B;&#x547D;&#x4EE4;&#x4E3A;python&#x7CFB;&#x7EDF;&#x5B9A;&#x4E49;&#x7684;&#x540D;&#x5B57;&#xFF0C;&#x662F;&#x7279;&#x6B8A;&#x65B9;&#x6CD5;&#x4E13;&#x7528;&#x7684;&#x6807;&#x8BC6;&#xFF0C;&#x8BF7;&#x4E0D;&#x8981;&#x81EA;&#x5DF1;&#x968F;&#x610F;&#x5B9A;&#x4E49;&#x8FD9;&#x7C7B;&#x547D;&#x4EE4;&#x3002;</p>
</blockquote>
<p>&#x5269;&#x4E0B;&#x7684;&#x90A3;&#x4E9B;&#x5C31;&#x662F;&#x5185;&#x7F6E;&#x7C7B;&#x65B9;&#x6CD5;&#x5566;&#xFF0C;&#x91CC;&#x9762;&#x592A;&#x591A;&#x4E86;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x611F;&#x5174;&#x8DA3;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x6211;&#x4EEC;&#x5B66;&#x8FC7;&#x7684;help&#x547D;&#x4EE4;&#x6765;&#x67E5;&#x770B;&#x5E2E;&#x52A9;&#x6587;&#x6863;&#x54E6;&#x3002;&#x6211;&#x4EEC;&#x6765;&#x6311;&#x4E00;&#x4E9B;&#x91CD;&#x70B9;&#x7684;&#x6765;&#x5199;&#x793A;&#x4F8B;&#x8BB2;&#x89E3;&#xFF1A;</p>
<pre class="language-"><code class="lang-python"><span class="token comment"># coding:utf-8</span>
<span class="token comment"># &#x5927;&#x5C0F;&#x5199;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</span>
a <span class="token operator">=</span> <span class="token string">&quot;my name is liTTle bai &#x5C0F;&#x767D;&quot;</span>
<span class="token comment"># title&#x65B9;&#x6CD5;&#xFF0C;&#x5C06;&#x6BCF;&#x4E2A;&#x5355;&#x8BCD;&#x9996;&#x5B57;&#x6BCD;&#x6539;&#x4E3A;&#x5927;&#x5199;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">.</span>title<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># lower&#x65B9;&#x6CD5;&#xFF0C;&#x5C06;&#x6BCF;&#x4E2A;&#x5B57;&#x6BCD;&#x6539;&#x4E3A;&#x5C0F;&#x5199;&#x3002;&#x6BD4;&#x5982;&#x5728;&#x6BD4;&#x8F83;&#x6587;&#x4EF6;&#x540E;&#x7F00;&#x540D;&#x65F6;&#x5341;&#x5206;&#x6709;&#x7528;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">.</span>lower<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># upper&#x65B9;&#x6CD5;&#xFF0C;&#x5C06;&#x6BCF;&#x4E2A;&#x5B57;&#x6BCD;&#x6539;&#x4E3A;&#x5927;&#x5199;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>a<span class="token punctuation">.</span>upper<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>

<span class="token comment"># &#x5220;&#x9664;&#x7A7A;&#x767D;&#x76F8;&#x5173;&#x65B9;&#x6CD5;&#xFF0C;&#x7A7A;&#x683C;&#xFF0C;&#x5236;&#x8868;&#x7B26;&#x7B49;&#x90FD;&#x53EF;&#x4EE5;</span>
b <span class="token operator">=</span> <span class="token string">&quot;    my name is liTTle bai &#x5C0F;&#x767D;            &quot;</span>
<span class="token comment"># strip&#x65B9;&#x6CD5;&#xFF0C;&#x5220;&#x9664;&#x9996;&#x5C3E;&#x7684;&#x7A7A;&#x767D;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>b<span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># lstrip&#x65B9;&#x6CD5;&#xFF0C;&#x5220;&#x9664;&#x5DE6;&#x8FB9;left&#x7684;&#x7A7A;&#x767D;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>b<span class="token punctuation">.</span>lstrip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># rstrip&#x65B9;&#x6CD5;&#xFF0C;&#x5220;&#x9664;&#x53F3;&#x8FB9;right&#x7684;&#x7A7A;&#x767D;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>b<span class="token punctuation">.</span>rstrip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># &#x8865;&#x5145;&#x4E00;&#x53E5;&#xFF0C;&#x8FD9;&#x4E9B;&#x65B9;&#x6CD5;&#x6709;&#x65F6;&#x5019;&#x662F;&#x53EF;&#x4EE5;&#x5D4C;&#x5957;&#x7684;&#xFF0C;&#x4E0D;&#x7528;&#x5199;&#x591A;&#x884C;&#x6765;&#x5904;&#x7406;&#xFF0C;&#x6BD4;&#x5982;&#x5148;&#x53D8;&#x5C0F;&#x5199;&#x518D;&#x5220;&#x9996;&#x5C3E;&#x7A7A;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>b<span class="token punctuation">.</span>lower<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>

<span class="token comment"># &#x67E5;&#x627E;&#x66FF;&#x6362;&#x76F8;&#x5173;&#x65B9;&#x6CD5;</span>
c <span class="token operator">=</span> <span class="token string">&quot;my name is little bai &#x5C0F;&#x767D;&quot;</span>
<span class="token comment"># startswith&#x65B9;&#x6CD5;&#xFF0C;&#x5224;&#x65AD;&#x5B57;&#x7B26;&#x4E32;&#x662F;&#x4E0D;&#x662F;&#x4EE5;&#x4F20;&#x5165;&#x7684;&#x53C2;&#x6570;&#x5F00;&#x5934;&#xFF0C;&#x4F1A;&#x8FD4;&#x56DE;&#x5E03;&#x5C14;&#x578B;&#x8FD4;&#x56DE;&#x503C;&#x771F;&#x6216;&#x5047;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>c<span class="token punctuation">.</span>startswith<span class="token punctuation">(</span><span class="token string">&quot;my&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># endswith&#x65B9;&#x6CD5;&#xFF0C;&#x5224;&#x65AD;&#x5B57;&#x7B26;&#x4E32;&#x662F;&#x4E0D;&#x662F;&#x4EE5;&#x4F20;&#x5165;&#x7684;&#x53C2;&#x6570;&#x7ED3;&#x5C3E;&#xFF0C;&#x4F1A;&#x8FD4;&#x56DE;&#x5E03;&#x5C14;&#x578B;&#x8FD4;&#x56DE;&#x503C;&#x771F;&#x6216;&#x5047;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>c<span class="token punctuation">.</span>endswith<span class="token punctuation">(</span><span class="token string">&quot;bai&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># find&#x65B9;&#x6CD5;&#xFF0C;&#x83B7;&#x53D6;&#x53C2;&#x6570;&#x5728;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x51FA;&#x73B0;&#x7684;&#x4F4D;&#x7F6E;&#x7D22;&#x5F15;&#xFF0C;&#x6CA1;&#x6709;&#x627E;&#x5230;&#x8FD4;&#x56DE;-1</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>c<span class="token punctuation">.</span>find<span class="token punctuation">(</span><span class="token string">&quot;is&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># replace&#x65B9;&#x6CD5;&#xFF0C;&#x5C06;&#x5B57;&#x7B26;&#x4E32;&#x4E2D;&#x7684;&#x67D0;&#x4E9B;&#x5185;&#x5BB9;&#xFF08;&#x5982;&#x6709;&#xFF09;&#xFF0C;&#x66FF;&#x6362;&#x6210;&#x522B;&#x7684;&#x5185;&#x5BB9;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>c<span class="token punctuation">.</span>replace<span class="token punctuation">(</span><span class="token string">&quot;&#x5C0F;&#x767D;&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x5C0F;&#x9ED1;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>

<span class="token comment"># &#x5206;&#x5272;&#x3001;&#x8FDE;&#x63A5;&#x65B9;&#x6CD5;</span>
<span class="token comment"># split&#x65B9;&#x6CD5;&#xFF0C;&#x5C06;&#x5B57;&#x7B26;&#x4E32;&#x6309;&#x7167;&#x6307;&#x5B9A;&#x7684;&#x5206;&#x5272;&#x7B26;&#x5206;&#x5272;&#x6587;&#x672C;&#xFF0C;&#x9ED8;&#x8BA4;&#x5206;&#x5272;&#x7B26;&#xFF08;&#x5982;&#x679C;&#x4E0D;&#x5199;&#xFF09;&#x4E3A;&#x7A7A;&#x683C;&#xFF08;&#x53EF;&#x4EE5;&#x662F;&#x591A;&#x4E2A;&#x7A7A;&#x683C;&#xFF09;</span>
d <span class="token operator">=</span> <span class="token string">&quot;my name is liTTle      bai &#x5C0F;&#x767D;&quot;</span>  <span class="token comment"># &#x51FA;&#x6765;&#x7684;&#x7ED3;&#x679C;&#x662F;&#x4E00;&#x4E2A;&#x5217;&#x8868;list&#xFF0C;&#x540E;&#x9762;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x518D;&#x505A;&#x8BE6;&#x7EC6;&#x8BB2;&#x89E3;&#x5982;&#x4F55;&#x540E;&#x7EED;&#x5904;&#x7406;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span>d<span class="token punctuation">.</span>split<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span class="token comment"># join&#x65B9;&#x6CD5;&#xFF0C;&#x521A;&#x624D;&#x5206;&#x5272;&#x7684;&#x53CD;&#x5411;&#x64CD;&#x4F5C;&#xFF0C;&#x628A;&#x4E00;&#x4E2A;&#x5217;&#x8868;&#x7684;&#x6BCF;&#x4E2A;&#x5143;&#x7D20;&#xFF08;&#x5217;&#x8868;&#x4E2D;&#x9017;&#x53F7;&#x5206;&#x9694;&#x5F00;&#x7684;&#x4E00;&#x4E2A;&#x4E2A;&#x79F0;&#x4F5C;&#x5143;&#x7D20;&#xFF09;</span>
<span class="token comment"># &#x6309;&#x7167;&#x6307;&#x5B9A;&#x7684;&#x8FDE;&#x63A5;&#x7B26;&#xFF08;&#x6BD4;&#x5982;&#x70B9;&#x53F7;.&#xFF09;&#x8FDE;&#x63A5;&#x8D77;&#x6765;</span>
<span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&quot;.&quot;</span><span class="token punctuation">.</span>join<span class="token punctuation">(</span>d<span class="token punctuation">.</span>split<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
</code></pre>
<p>&#x8BF4;&#x4E86;&#x8FD9;&#x4E48;&#x591A;&#xFF0C;&#x53EF;&#x80FD;&#x5927;&#x5BB6;&#x90FD;&#x5DF2;&#x7ECF;&#x6709;&#x4E9B;&#x6655;&#x6655;&#x4E4E;&#x4E4E;&#x7684;&#x4E86;&#x3002;&#x4E0D;&#x8FC7;&#x6CA1;&#x5173;&#x7CFB;&#xFF0C;&#x672C;&#x8282;&#x8BFE;&#x503C;&#x5F97;&#x5927;&#x5BB6;&#x7EC6;&#x7EC6;&#x54C1;&#x5473;&#xFF0C;&#x5982;&#x679C;&#x4E00;&#x904D;&#x6CA1;&#x6709;&#x638C;&#x63E1;&#xFF0C;&#x8BF7;&#x591A;&#x56DE;&#x6765;&#x770B;&#x51E0;&#x904D;&#xFF0C;&#x8BB0;&#x4F4F;&#x5E38;&#x7528;&#x7684;&#x90A3;&#x4E9B;&#x547D;&#x4EE4;&#x7684;&#x5355;&#x8BCD;&#xFF0C;&#x5F53;&#x4F60;&#x9700;&#x8981;&#x7684;&#x65F6;&#x5019;&#x5C31;&#x5F88;&#x5BB9;&#x6613;&#x4E86;&#xFF0C;&#x5B83;&#x4EEC;&#x7684;&#x4F7F;&#x7528;&#x90FD;&#x662F;&#x76F8;&#x5F53;&#x7B80;&#x5355;&#x7684;&#x3002;</p>
<h3 id="&#x5355;&#x8BCD;&#x91CA;&#x4E49;"><a name="&#x5355;&#x8BCD;&#x91CA;&#x4E49;" class="anchor-navigation-ex-anchor" href="#&#x5355;&#x8BCD;&#x91CA;&#x4E49;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5355;&#x8BCD;&#x91CA;&#x4E49;</h3>
<table>
<thead>
<tr>
<th>&#x5355;&#x8BCD;</th>
<th>&#x91CA;&#x4E49;</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tab</td>
<td>&#x8FD9;&#x91CC;&#x6307;&#x952E;&#x76D8;&#x4E0A;&#x7684;Tab&#x952E;&#xFF0C;&#x4F1A;&#x8F93;&#x51FA;&#x4E00;&#x4E2A;&#x5236;&#x8868;&#x7B26;\t</td>
</tr>
<tr>
<td>num</td>
<td>number&#x6570;&#x5B57;&#x7684;&#x7B80;&#x5199;</td>
</tr>
<tr>
<td>tuple</td>
<td>&#x5143;&#x7EC4;</td>
</tr>
<tr>
<td>format</td>
<td>&#x683C;&#x5F0F;&#x5316;</td>
</tr>
<tr>
<td>formatted string literals</td>
<td>&#x683C;&#x5F0F;&#x5316;&#x5B57;&#x7B26;&#x4E32;&#x5E38;&#x91CF;</td>
</tr>
<tr>
<td>dir</td>
<td>&#x5168;&#x79F0;&#x4E3A;directory&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x7406;&#x89E3;&#x4E3A;&#x76EE;&#x5F55;&#xFF0C;&#x7F57;&#x5217;&#x51FA;&#x6765;</td>
</tr>
<tr>
<td>list</td>
<td>&#x5217;&#x8868;</td>
</tr>
<tr>
<td>in</td>
<td>&#x5728;...&#x91CC;&#x9762;</td>
</tr>
<tr>
<td>len</td>
<td>length&#x957F;&#x5EA6;&#x7684;&#x7B80;&#x6D01;&#x5199;&#x6CD5;&#xFF0C;&#x8FD9;&#x91CC;&#x662F;&#x4E00;&#x4E2A;&#x547D;&#x4EE4;&#x540D;</td>
</tr>
<tr>
<td>title</td>
<td>&#x6807;&#x9898;&#xFF0C;&#x8FD9;&#x91CC;&#x662F;&#x4E00;&#x4E2A;&#x547D;&#x4EE4;&#x540D;</td>
</tr>
<tr>
<td>lower</td>
<td>&#x4E0B;&#x9762;&#x7684;</td>
</tr>
<tr>
<td>upper</td>
<td>&#x4E0A;&#x9762;&#x7684;</td>
</tr>
<tr>
<td>strip</td>
<td>&#x9664;&#x53BB;&#xFF0C;&#x5265;&#x53BB;</td>
</tr>
<tr>
<td>lstrip</td>
<td>&#x5E94;&#x8BE5;&#x662F;left strip&#x7684;&#x7B80;&#x5199;&#xFF0C;left&#x4E3A;&#x5DE6;&#x8FB9;</td>
</tr>
<tr>
<td>rstrip</td>
<td>&#x5E94;&#x8BE5;&#x662F;right strip&#x7684;&#x7B80;&#x5199;&#xFF0C;right&#x4E3A;&#x53F3;&#x8FB9;</td>
</tr>
<tr>
<td>startswith</td>
<td>start&#x5F00;&#x59CB;&#xFF0C;with&#x7ED3;&#x5408;&#x4E0A;&#x4E0B;&#x6587;&#x7406;&#x89E3;&#x4E3A;&#x8DDF;&#x7740;&#x5565;</td>
</tr>
<tr>
<td>endswith</td>
<td>end&#x7ED3;&#x675F;&#xFF0C;with&#x7ED3;&#x5408;&#x4E0A;&#x4E0B;&#x6587;&#x7406;&#x89E3;&#x4E3A;&#x8DDF;&#x7740;&#x5565;</td>
</tr>
<tr>
<td>find</td>
<td>&#x5BFB;&#x627E;</td>
</tr>
<tr>
<td>replace</td>
<td>&#x66FF;&#x6362;</td>
</tr>
<tr>
<td>split</td>
<td>&#x5206;&#x5272;&#xFF0C;&#x5206;&#x88C2;</td>
</tr>
<tr>
<td>join</td>
<td>&#x8FDE;&#x63A5;&#xFF0C;&#x52A0;&#x5165;</td>
</tr>
</tbody>
</table>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; <a href="http://fox-9.com" target="_blank">&#x96EA;&#x5C71;&#x51CC;&#x72D0;&#x6559;&#x7A0B;</a> all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-09-19 12:35:13
</span></footer></body></html>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="2-8 python3小白课：字节串.html" class="navigation navigation-prev " aria-label="Previous page: 2-8 python3小白课：字节串">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="2-10 python3小白课：赋值运算符.html" class="navigation navigation-next " aria-label="Next page: 2-10 python3小白课：赋值运算符">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"2-9 python3小白课：字符串进阶","level":"1.4.9","depth":2,"next":{"title":"2-10 python3小白课：赋值运算符","level":"1.4.10","depth":2,"path":"chapter2/2-10 python3小白课：赋值运算符.md","ref":"./chapter2/2-10 python3小白课：赋值运算符.md","articles":[]},"previous":{"title":"2-8 python3小白课：字节串","level":"1.4.8","depth":2,"path":"chapter2/2-8 python3小白课：字节串.md","ref":"./chapter2/2-8 python3小白课：字节串.md","articles":[]},"dir":"ltr"},"config":{"plugins":["favicon","-search","-lunr","-sharing","-livereload","-highlight","prism","prism-themes","fontsettings","back-to-top-button","expandable-chapters-small","code","search-pro","splitter","donate","tbfed-pagefooter","pageview-count","auto-scroll-table","lightbox","anchor-navigation-ex","sitemap-general","ad","image-captions","autotheme","advanced-emoji","flexible-alerts","statistics","push-bd"],"styles":{"website":"/css/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy <a href='http://fox-9.com'>雪山凌狐教程</a>","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prism-themes/themes/prism-material-light.css"]},"ad":{"contentBottom":false},"statistics":{"bd_url":"https://hm.baidu.com/hm.js","cnzz_url":"https://s95.cnzz.com/z_stat.php","google_url":"https://www.googletagmanager.com/gtag/js","bd_token":"605d1993c133629d69ab2701f78d9690"},"splitter":{},"search-pro":{},"auto-scroll-table":{},"code":{"copyButtons":true},"donate":{"alipay":"/python3xiaobaike/assets/alipay-code.jpg","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"/python3xiaobaike/assets/wechatpay-code.jpg","wechatText":"微信打赏"},"sitemap-general":{"prefix":"http://doc.fox-9.com/python3xiaobaike/"},"fontsettings":{"family":"sans","size":2,"theme":"white"},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"fa fa-hand-o-right","level2Icon":"fa fa-hand-o-right","level3Icon":"fa fa-hand-o-right","showLevelIcon":true},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":false,"showLevel":false},"favicon":{"shortcut":"/assets/favicon.ico","bookmark":"/assets/favicon.ico"},"lightbox":{"jquery":true,"sameUuid":false},"push-bd":{},"back-to-top-button":{},"pageview-count":{},"prism-themes":{},"expandable-chapters-small":{},"flexible-alerts":{"danger":{"className":"danger","icon":"fa fa-ban","label":"注意"},"note":{"className":"info","icon":"fa fa-info-circle","label":"说明"},"style":"flat","tip":{"className":"tip","icon":"fa fa-lightbulb-o","label":"提示"},"warning":{"className":"warning","icon":"fa fa-exclamation-triangle","label":"警告"},"question":{"label":"问题","icon":"fa fa-question-circle","className":"question"}},"autotheme":{"night":[20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],"sepia":[25,25,25,25,25,25],"white":[25,25,25,25,25,25,25,25]},"advanced-emoji":{"embedEmojis":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"image-captions":{"caption":"_CAPTION_","variable_name":"_pictures"}},"theme":"default","author":"雪山凌狐","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"CATALOG_FOR_GITBOOK.md"},"variables":{"_pictures":[{"backlink":"./chapter1/1-1 python3小白课：python语言简介.html#fig1.3.1.1","level":"1.3.1","list_caption":"Figure: 图1-1-1 龟叔","alt":"图1-1-1 龟叔","nro":1,"url":"assets/1-1-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-1-1 龟叔","attributes":{},"skip":false,"key":"1.3.1.1"},{"backlink":"./chapter1/1-1 python3小白课：python语言简介.html#fig1.3.1.2","level":"1.3.1","list_caption":"Figure: 图1-1-2 python2的最后一个版本官方博客","alt":"图1-1-2 python2的最后一个版本官方博客","nro":2,"url":"assets/1-1-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-1-2 python2的最后一个版本官方博客","attributes":{},"skip":false,"key":"1.3.1.2"},{"backlink":"./chapter1/1-2 python3小白课：python下载.html#fig1.3.2.1","level":"1.3.2","list_caption":"Figure: 图1-2-1 python官网界面","alt":"图1-2-1 python官网界面","nro":3,"url":"assets/1-2-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-2-1 python官网界面","attributes":{},"skip":false,"key":"1.3.2.1"},{"backlink":"./chapter1/1-2 python3小白课：python下载.html#fig1.3.2.2","level":"1.3.2","list_caption":"Figure: 图1-2-2 python3.8.2版本安装包","alt":"图1-2-2 python3.8.2版本安装包","nro":4,"url":"assets/1-2-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-2-2 python3.8.2版本安装包","attributes":{},"skip":false,"key":"1.3.2.2"},{"backlink":"./chapter1/1-3 python3小白课：python安装.html#fig1.3.3.1","level":"1.3.3","list_caption":"Figure: 图1-3-1 安装界面1","alt":"图1-3-1 安装界面1","nro":5,"url":"assets/1-3-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-3-1 安装界面1","attributes":{},"skip":false,"key":"1.3.3.1"},{"backlink":"./chapter1/1-3 python3小白课：python安装.html#fig1.3.3.2","level":"1.3.3","list_caption":"Figure: 图1-3-2 安装界面2","alt":"图1-3-2 安装界面2","nro":6,"url":"assets/1-3-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-3-2 安装界面2","attributes":{},"skip":false,"key":"1.3.3.2"},{"backlink":"./chapter1/1-3 python3小白课：python安装.html#fig1.3.3.3","level":"1.3.3","list_caption":"Figure: 图1-3-3 安装界面3","alt":"图1-3-3 安装界面3","nro":7,"url":"assets/1-3-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图1-3-3 安装界面3","attributes":{},"skip":false,"key":"1.3.3.3"},{"backlink":"./chapter1/1-6 python3小白课：使用python IDLE.html#fig1.3.6.1","level":"1.3.6","list_caption":"Figure: 图1-6-1 python shell","alt":"图1-6-1 python shell","nro":8,"url":"assets/1-6-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-6-1 python shell","attributes":{},"skip":false,"key":"1.3.6.1"},{"backlink":"./chapter1/1-6 python3小白课：使用python IDLE.html#fig1.3.6.2","level":"1.3.6","list_caption":"Figure: 图1-6-2 python IDLE写py文件","alt":"图1-6-2 python IDLE写py文件","nro":9,"url":"assets/1-6-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-6-2 python IDLE写py文件","attributes":{},"skip":false,"key":"1.3.6.2"},{"backlink":"./chapter1/1-7 python3小白课：使用python shell.html#fig1.3.7.1","level":"1.3.7","list_caption":"Figure: 图1-7-1 进入python shell","alt":"图1-7-1 进入python shell","nro":10,"url":"assets/1-7-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图1-7-1 进入python shell","attributes":{},"skip":false,"key":"1.3.7.1"},{"backlink":"./chapter1/1-7 python3小白课：使用python shell.html#fig1.3.7.2","level":"1.3.7","list_caption":"Figure: 图1-7-2 python shell代码测试","alt":"图1-7-2 python shell代码测试","nro":11,"url":"assets/1-7-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图1-7-2 python shell代码测试","attributes":{},"skip":false,"key":"1.3.7.2"},{"backlink":"./chapter6/6-8 python3小白课：解锁你心仪的三方包.html#fig1.8.8.1","level":"1.8.8","list_caption":"Figure: 图6-8-1 pypi官网首页","alt":"图6-8-1 pypi官网首页","nro":12,"url":"assets/6-8-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图6-8-1 pypi官网首页","attributes":{},"skip":false,"key":"1.8.8.1"},{"backlink":"./chapter6/6-8 python3小白课：解锁你心仪的三方包.html#fig1.8.8.2","level":"1.8.8","list_caption":"Figure: 图6-8-2 requests搜索结果","alt":"图6-8-2 requests搜索结果","nro":13,"url":"assets/6-8-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图6-8-2 requests搜索结果","attributes":{},"skip":false,"key":"1.8.8.2"},{"backlink":"./chapter6/6-8 python3小白课：解锁你心仪的三方包.html#fig1.8.8.3","level":"1.8.8","list_caption":"Figure: 图6-8-3 包的内页","alt":"图6-8-3 包的内页","nro":14,"url":"assets/6-8-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图6-8-3 包的内页","attributes":{},"skip":false,"key":"1.8.8.3"},{"backlink":"./chapter6/6-8 python3小白课：解锁你心仪的三方包.html#fig1.8.8.4","level":"1.8.8","list_caption":"Figure: 图6-8-4 下载文件页面","alt":"图6-8-4 下载文件页面","nro":15,"url":"assets/6-8-4.jpg","index":4,"caption_template":"_CAPTION_","label":"图6-8-4 下载文件页面","attributes":{},"skip":false,"key":"1.8.8.4"},{"backlink":"./chapter6/6-9 python3小白课：虚拟环境介绍和安装.html#fig1.8.9.1","level":"1.8.9","list_caption":"Figure: 图6-9-1 新建系统环境变量WORKON_HOME","alt":"图6-9-1 新建系统环境变量WORKON_HOME","nro":16,"url":"assets/6-9-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图6-9-1 新建系统环境变量WORKON_HOME","attributes":{},"skip":false,"key":"1.8.9.1"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.1","level":"1.8.10","list_caption":"Figure: 图6-10-1 创建test虚拟环境","alt":"图6-10-1 创建test虚拟环境","nro":17,"url":"assets/6-10-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图6-10-1 创建test虚拟环境","attributes":{},"skip":false,"key":"1.8.10.1"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.2","level":"1.8.10","list_caption":"Figure: 图6-10-2 退出虚拟环境","alt":"图6-10-2 退出虚拟环境","nro":18,"url":"assets/6-10-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图6-10-2 退出虚拟环境","attributes":{},"skip":false,"key":"1.8.10.2"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.3","level":"1.8.10","list_caption":"Figure: 图6-10-3 workon激活虚拟环境test","alt":"图6-10-3 workon激活虚拟环境test","nro":19,"url":"assets/6-10-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图6-10-3 workon激活虚拟环境test","attributes":{},"skip":false,"key":"1.8.10.3"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.4","level":"1.8.10","list_caption":"Figure: 图6-10-4 虚拟环境下的pip","alt":"图6-10-4 虚拟环境下的pip","nro":20,"url":"assets/6-10-4.jpg","index":4,"caption_template":"_CAPTION_","label":"图6-10-4 虚拟环境下的pip","attributes":{},"skip":false,"key":"1.8.10.4"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.5","level":"1.8.10","list_caption":"Figure: 图6-10-5 删除虚拟环境test","alt":"图6-10-5 删除虚拟环境test","nro":21,"url":"assets/6-10-5.jpg","index":5,"caption_template":"_CAPTION_","label":"图6-10-5 删除虚拟环境test","attributes":{},"skip":false,"key":"1.8.10.5"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.6","level":"1.8.10","list_caption":"Figure: 图6-10-6 python3.6.6安装","alt":"图6-10-6 python3.6.6安装","nro":22,"url":"assets/6-10-6.jpg","index":6,"caption_template":"_CAPTION_","label":"图6-10-6 python3.6.6安装","attributes":{},"skip":false,"key":"1.8.10.6"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.7","level":"1.8.10","list_caption":"Figure: 图6-10-7 创建python3.6.6的虚拟环境","alt":"图6-10-7 创建python3.6.6的虚拟环境","nro":23,"url":"assets/6-10-7.jpg","index":7,"caption_template":"_CAPTION_","label":"图6-10-7 创建python3.6.6的虚拟环境","attributes":{},"skip":false,"key":"1.8.10.7"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.8","level":"1.8.10","list_caption":"Figure: 图6-10-8 python2.7.18安装","alt":"图6-10-8 python2.7.18安装","nro":24,"url":"assets/6-10-8.jpg","index":8,"caption_template":"_CAPTION_","label":"图6-10-8 python2.7.18安装","attributes":{},"skip":false,"key":"1.8.10.8"},{"backlink":"./chapter6/6-10 python3小白课：虚拟环境使用.html#fig1.8.10.9","level":"1.8.10","list_caption":"Figure: 图6-10-9 创建python2.7.18的虚拟环境","alt":"图6-10-9 创建python2.7.18的虚拟环境","nro":25,"url":"assets/6-10-9.jpg","index":9,"caption_template":"_CAPTION_","label":"图6-10-9 创建python2.7.18的虚拟环境","attributes":{},"skip":false,"key":"1.8.10.9"},{"backlink":"./chapter7/7-1 python3小白课：一节课搞懂面向对象.html#fig1.9.1.1","level":"1.9.1","list_caption":"Figure: 图7-1-1 暖风机","alt":"图7-1-1 暖风机","nro":26,"url":"assets/7-1-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图7-1-1 暖风机","attributes":{},"skip":false,"key":"1.9.1.1"},{"backlink":"./chapter7/7-1 python3小白课：一节课搞懂面向对象.html#fig1.9.1.2","level":"1.9.1","list_caption":"Figure: 图7-1-2 会摇头的暖风机","alt":"图7-1-2 会摇头的暖风机","nro":27,"url":"assets/7-1-2.jpg","index":2,"caption_template":"_CAPTION_","label":"图7-1-2 会摇头的暖风机","attributes":{},"skip":false,"key":"1.9.1.2"},{"backlink":"./chapter7/7-1 python3小白课：一节课搞懂面向对象.html#fig1.9.1.3","level":"1.9.1","list_caption":"Figure: 图7-1-3 会摇头的冷风机","alt":"图7-1-3 会摇头的冷风机","nro":28,"url":"assets/7-1-3.jpg","index":3,"caption_template":"_CAPTION_","label":"图7-1-3 会摇头的冷风机","attributes":{},"skip":false,"key":"1.9.1.3"},{"backlink":"./chapter7/7-7 python3小白课：重写父类方法和使用super函数.html#fig1.9.7.1","level":"1.9.7","list_caption":"Figure: 图7-7-1 鸡的图片","alt":"图7-7-1 鸡的图片","nro":29,"url":"assets/7-7-1.jpg","index":1,"caption_template":"_CAPTION_","label":"图7-7-1 鸡的图片","attributes":{},"skip":false,"key":"1.9.7.1"}]},"title":"python3小白课笔记","language":"zh-hans","links":{"sidebar":{"雪山凌狐教程":"http://fox-9.com"}},"gitbook":"3.2.3","description":"python3小白课，让你不再惧怕python的入门学习"},"file":{"path":"chapter2/2-9 python3小白课：字符串进阶.md","mtime":"2020-09-19T04:35:13.290Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-09-14T10:02:56.416Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ad/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-autotheme/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-statistics/statistics.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-push-bd/plugin.js"></script>
        
    

    </body>
</html>

